using System.Collections.Specialized;

namespace CloudStorage.API.Blobs
{
	/// <summary>
	/// Cloud Storage BlobStorage contract
	/// </summary>
	public interface IBlobStorageAccount : ICloudStorageAccount
	{
		/// <summary>
		/// Create or update the container if it does not exist.
		/// The container is created or updated with private access control and no metadata.
		/// </summary>
		/// <param name="containerName">The name of the Container</param>		
		ICloudVersionable CreateContainer(string containerName);

		/// <summary>
		/// Create or update the container with the specified metadata and access control if it does not exist
		/// </summary>
		/// <param name="containerName">The name of the Container</param>
		/// <param name="metadata">The metadata for the container. Can be null to indicate no metadata</param>
		ICloudVersionable CreateContainer(string containerName, NameValueCollection metadata);

		/// <summary>
		/// Lists the containers within the account.
		/// </summary>
		/// <returns>A list of containers</returns>
		IListResponse<IBlobContainerListItem> ListContainers();

		/// <summary>
		/// Lists the containers within the account.
		/// </summary>
		/// <param name="prefix">Filters the results to return only containers whose name begins with the specified prefix.</param>
		/// <returns>A list of containers</returns>
		IListResponse<IBlobContainerListItem> ListContainers(string prefix);

		/// <summary>
		/// Lists the containers within the account.
		/// </summary>
		/// <param name="prefix">Filters the results to return only containers whose name begins with the specified prefix.</param>
		/// <param name="marker">A string value that identifies the portion of the list to be returned with the next list operation.</param>
		/// <param name="maxResults">Specifies the maximum number of containers to return. If maxresults is not specified, the server will return up to 5,000 items.</param>
		/// <returns>A list of containers</returns>
		IListResponse<IBlobContainerListItem> ListContainers(string prefix, string marker, int maxResults);
	}
}